Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a compilation error in MSVC #2121

Merged
merged 3 commits into from
May 19, 2020

Conversation

gistrec
Copy link

@gistrec gistrec commented May 18, 2020

Related to #1514 and #1531

  • What is the issue you have?
    Failed to build if <Windows.h> is included:

C4003: not enough arguments for function-like macro invocation 'max'

Code:
static_cast<double>(std::numeric_limits<float>::max())
should be:
static_cast<double>((std::numeric_limits<float>::max)())

@gistrec gistrec requested a review from nlohmann as a code owner May 18, 2020 08:07
@dota17
Copy link
Contributor

dota17 commented May 18, 2020

Thank you Alex! Could you please also fix this in test/src/unit-cbor.cpp?

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run make amalgamate to also apply the changes to the single header.

@coveralls
Copy link

coveralls commented May 18, 2020

Coverage Status

Coverage remained the same at 99.941% when pulling 9e765f5 on gistrec:fix_compilation_error_msvc into 16d78a8 on nlohmann:develop.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann self-assigned this May 19, 2020
@nlohmann nlohmann added this to the Release 3.8.0 milestone May 19, 2020
@nlohmann nlohmann merged commit a861bdb into nlohmann:develop May 19, 2020
@nlohmann
Copy link
Owner

Thanks!

@nlohmann
Copy link
Owner

nlohmann commented May 19, 2020


🔖 Release item

This issue/PR will be part of the next release of the library. This template helps preparing the release notes.

Type

  • ✨ New Feature
  • 🐛 Bug Fix
  • ⚡️ Improvement
  • 🔨 Further Change
  • 🔥 Deprecated function

Description


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants